package ModelLayer;

/**
 * The class Person creates the information about a person.
 * 
 * @author Gruppe A 
 * @version 1.0
 */
public class Person
{
    // instance variables for id, name, adress, postnr, city, phoneNumber
    private long id;
    private String name;
    private String address;
    private int postnr;
    private String city;
    private String phoneNumber;

    /**
     * Constructor for objects of class Person
     * @param id An id to a person
     * @param name A name to a person
     * @param address An address to a person
     * @param postnr A postnr to a person
     * @param city A city to a person
     * @param phoneNumber A phoneNumber to a person
     */
    public Person(long id, String name, String address, int postnr, String city, String phoneNumber)
    {
        // initialise instance variables
        this.id = id;
        this.name = name;
        this.address = address;
        this.postnr = postnr;
        this.city = city;
        this.phoneNumber = phoneNumber;
    }
    
    /**
     * @return A set of long, where each long is a typed by the user
     */
    public long getId()
    {
        return id;
    }
    
    /**
     * @return A set of String, where each long is a typed by the user
     */
    public String getName()
    {
        return name;
    }
    
    /**
     * @return A set of String, where each String is a word typed by the user
     */
    public String getAddress()
    {
        return address;
    }
    
    /**
     * @return A set of integer, where each integer is a word typed by the user
     */
    public int getPostnr()
    {
        return postnr;
    }
    
    /**
     * @return A set of String, where each String is a word typed by the user
     */
    public String getCity()
    {
        return city;
    }
    
    /**
     * @return A set of String, where each String is a word typed by the user
     */
    public String getPhoneNumber()
    {
        return phoneNumber;
    }
    
    /**
     * This method allows the contents of id to be changed
     */
    public void setId(long newId)
    {
        id = newId;
    }
    
    /**
     * This method allows the contents of id to be changed
     */
    public void setName(String newName)
    {
        name = newName;
    }
    
    /**
     * This method allows the contents of id to be changed
     */
    public void setAddress(String newAddress)
    {
        address = newAddress;
    }
   
    /**
     * This method allows the contents of p to be changed
     */
    public void setPostnr(int newPostnr)
    {
        postnr = newPostnr;
    }
    
    /**
     * This method allows the contents of city to be changed
     */
    public void setCity(String newCity)
    {
        city = newCity;
    }
    
   /**
     * This method allows the contents of phoneNumber to be changed
     */
    public void setPhoneNumber(String newPhoneNumber)
    {
        phoneNumber = newPhoneNumber;
    }
}
